package View;

import java.util.TimerTask;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JProgressBar;

import Controller.*;


public class ProgBar extends Thread{

private static JProgressBar bar, showbar;
private static boolean progbool;
	public ProgBar(){
		
	}
	
	public static void openProgBar(){
		bar=new JProgressBar(0,100);
		showbar= new JProgressBar(0,100);
		showbar.setStringPainted(true);
		GUI.addComp(showbar, 100, 150, 360, 20);

	}
	
	
	

	public  void run(){

		while (bar.getValue()<100){
				
				bar.setValue((int)Math.round(Converter.progress));
				
				
				if (showbar.getValue() != bar.getValue()) {
					showbar.setValue(bar.getValue());
				showbar.update(showbar.getGraphics());
			 	}
				
				
				
			

			}
			
	}
}
	

